#include <iostream>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <vector>
#include <map>
#include <queue>
#include <cstdio>
#include <string>
#include <stack>
#include <set>
#define IOS ios::sync_with_stdio(false), cin.tie(0)
using namespace std;
typedef long long ll;
const double esp=1e-5;
ll n;
double s;
double a[1000000];

int main()
{
    IOS;
    cin>>n>>s;
    for(ll i=0;i<n;i++){
        cin>>a[i];
    }
    sort(a,a+n);
    double p=s/(double)n;
    double ch=0;
    ll i;
    double ans=0;
    for(i=0;i<n;i++){
        if(a[i]>=p){
            break;
        }
        ch+=(p-a[i]);
        ans+=((p-a[i])*(p-a[i]));
    }
    double np;
    for(;i<n;i++){
        np=ch/(double)(n-i);
        if(a[i]-p<np){
            double nch=a[i]-p;
            ans+=(nch*nch);
            ch-=nch;
        }
        else {
            ans+=(np*np);
            ch-=np;
        }
    }
    ans=ans/(double)n;
    double l=0,r=ans;
    double mid=(l+r)/2;
    while(fabs(mid*mid-ans)>esp){
        mid=(l+r)/2;
        if(mid*mid-ans>esp){
            r=mid;
        }
        else l=mid;
    }
    printf("%.4f\n",mid);
    getchar();
    getchar();
    return 0;
}
